<?php
	abstract class XMLConfig{
		
		public static function xml_get_tree_as_array($path){
			$raw = file_get_contents($path);
			$parser = xml_parser_create("UTF-8");
			xml_parse_into_struct($parser, $raw, $values);
			$keys = array();
			foreach($values as $value){
				if((strcmp($value["type"], "cdata") != 0 )&& (strcmp($value["type"], "close") != 0) && (strcmp($value["type"], "close") != 0)){
					if(isset($value["value"])){
						$keys[$value["tag"]] = $value["value"];
					}else{
						$keys[$value["tag"]] = "";
					}
				}
			}
			return $keys;
		}
	}
?>